package cn.sycoder.mapper;

import cn.sycoder.entity.Role;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 杨润发
 * @since 2024-10-20
 */
@Repository
public interface RoleMapper extends BaseMapper<Role> {

    // 自定义sql查询角色名称
    @Select("select role_name from role where role_id = #{roleId}")
    String selectRoleName(Long roleId);
}
